package cn.sqsoft.springresearch;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.test.AbstractDependencyInjectionSpringContextTests;


public abstract class AbstractBaseBizTestCase extends AbstractDependencyInjectionSpringContextTests {
    
    protected final Log log = LogFactory.getLog(getClass());
    protected static ResourceBundle rb = null;

    protected String[] getConfigLocations() {
        setAutowireMode(AUTOWIRE_BY_NAME);
        return new String[] {
                "classpath*:/beans.xml"                
        };
    }

    //~ Constructors ===========================================================

    public AbstractBaseBizTestCase() {
        // Since a ResourceBundle is not required for each class, just
        // do a simple check to see if one exists
        String className = this.getClass().getName();

        try {
            rb = ResourceBundle.getBundle(className);
        } catch (MissingResourceException mre) {
            log.warn("No resource bundle found for: " + className);
        }
    }
}

